package com.webex.ta.hydra.gui.action;

import com.webex.ta.hydra.gui.GuiPackage;
import com.webex.ta.hydra.gui.table.HydraTable;

import java.awt.event.ActionEvent;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by Cisco WebEx.
 * User: vegaz
 * Date: 2010-10-9
 * Time: 8:52:35
 */
public class EditAnnotationAction implements ActionHandler {
    private static Set<String> commands = new HashSet<String>();

    static {
        commands.add(ActionNames.EDIT_ANNOTATION);
    }

    public Set<String> getActionNames() {
        return commands;
    }

    public void doAction(ActionEvent e) {
        GuiPackage gp = GuiPackage.getInstance();
        HydraTable table = gp.getHydraTable();
        if (table.getSelectedRow() != -1)
            gp.getHydraTable().editAnnotationAt(table.getSelectedRow());
    }
}
